package com.heima.media.listener;

import com.heima.media.task.ArticleDelayTask;
import org.redisson.api.RBlockingDeque;
import org.redisson.api.RDelayedQueue;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.Date;
import java.util.concurrent.TimeUnit;

@Component
public class ArticleDelayListener {

    @Autowired
    private ArticleDelayTask articleDelayTask;
    @PostConstruct   //当前对象初始化后就会执行这个方法
    public void handleMessage()throws Exception{
        articleDelayTask.handleMessage();
    }
}
